asm/atomic.h: implement missing and add common prototypes
ARM (<asm-arm/atomic.h>):
* add atomic_add_unless() wrapper over __atomic_add_unless()
(for common-code interface, i.e. <xen/atomic.h>)
X86 (<asm-x86/atomic.h>):
* implement missing functions atomic_{sub,inc,dec}_return(), atomic_add_unless()
* implement missing macro atomic_xchg()
COMMON (<xen/atomic.h>):
* add prototypes for the aforementioned newly implemented X86 functions in
common <xen/atomic.h>
Signed-off-by: Corneliu ZUZU <czuzu@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>